package com.alan.edu.mybatis.dao;

import com.alan.edu.mybatis.pojo.User;

import java.util.List;

/**
 * User dao
 * @author alan
 * @date 2020-08-31 00:52:06
 */
public interface IUserDao {

    //查询所有用户
    public List<User> findAll() throws Exception;


    //根据条件进行用户查询
    public User findByCondition(User user) throws Exception;

    /**
     * 新增用户
     *
     * @param user
     * @return
     * @throws Exception
     */
    public void insert(User user) throws Exception;

    /**
     * 根据用户id，更新用户对象
     *
     * @param user
     * @return
     * @throws Exception
     */
    public void updateByUserId(User user) throws Exception;

    /**
     * 根据用户id，删除用户对象
     *
     * @param user
     * @throws Exception
     */
    public void deleteByUserId(User user) throws Exception;

}
